{% extends "base.html" %}

{% block title %}Password reset{% endblock %}

{% block head %}
<script type="text/javascript">
  $(function() {
    $("#id_new_password1").focus();
  });
</script>
{% endblock %}

{% block primary-content %}
  {% if validlink %}
<span class="breadcrumbs"><a href="{% url index %}" title="Home">Home</a> &raquo; Reset Password</span>
<h2>Please enter your new password</h2>
<div class="form-wrapper clearfix">
	<p>Please enter your new password twice so we can verify you typed it in correctly.</p>
	{% if form.errors %}
	<p class="error">Please enter the same password in both fields.</p>
	{% endif %}
	<form class="simple-form" method="post">
		{% csrf_token %}
		<div class="form-item{% if form.new_password1.errors %} error{% endif %}">
			<label for="id_new_password1">New password</label>
			{{ form.new_password1 }}
		</div>      
		<div class="form-item{% if form.new_password2.errors %} error{% endif %}">
			<label for="id_new_password2">Confirm password</label>
			{{ form.new_password2 }}
		</div>      
		<div class="form-input clear-left">
			<input class="button" type="submit" value="Change my password"/>
		</div>
	</form>
</div><!--end .form-wrapper-->
{% else %}
<span class="pre-title">Invalid link</span>
<h2>Password reset unsuccessful</h2>
<div class="clearfix">
	<p>The password reset link was invalid, possibly because it has already been used.  Please <a href="{% url auth_password_reset %}">request a new password reset</a>.</p>
</div>
  {% endif %}
{% endblock %}

{% block secondary-content %}
  {% include "snippets/reports_and_news.html" %}
{% endblock %}

